package database

import (
	"go-admin/tools"
	"go-admin/tools/config"
)

func Setup() {
	dbType := config.DatabaseConfig.Dbtype
	if dbType == string(tools.Mysql) {
		var db = new(Mysql)
		db.Setup()
	} else if dbType == string(tools.Sqlite) {
		var db = new(SqlLite)
		db.Open("sqlite", config.DatabaseConfig.Sqlitefile)
	}
}
